Skip to content

docs(skills): parent-path record-currency amounts admit no grouping; data eval for the parent-path currencyField - #33394

Merged
os-zhuang merged 2 commits into
mainfrom
claude/project-thread-z8yej2
Nov 15, 2026
Merged

os-zhuang merged 2 commits into
mainfrom
claude/project-thread-z8yej2

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Leehom · project thread

Fixes #32392

domain:skills#1 · os-project-manager · session_01FEkQ5kJc3VU2HmGSE78u8t

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:objectstack-ui 仪表盘规则里关于 currencyMode: 'record' 金额的那句,补上「currencyField 是父路径(如 'invoice.currency_code')的金额,任何分组都不放行」,指向 objectstack-data → Field Types → Currency,并给出两种可用的单币种口径(该金额的 homeAmount 字段,或父对象的 summary);objectstack-data 的 eval 新增一例:发票明细金额跟随发票币种、lookup 路径被拒。
  • 为什么改:旧句只说「按其代码字段分组即可」,作者照着对父路径金额按路径分组,在 main 上会被拒(引擎聚合门与分析 cube 门都拒);而父路径写法上线后 eval 里还没有一例测它。
  • 风险与回滚:纯技能文字与 eval,不动 schema、不动运行时;dashboards.md 改 4 行删 4 行,token 6232 到 6226(付账删了同一注释里两个住在包源码的从句);回滚即还原本 PR。
  • 先看:skills/objectstack-ui/rules/dashboards.md 第 306–311 行;再看 eval 文件末尾第 18 例。
  • 两分钟验证:git diff origin/main -- skills/,预期仪表盘规则只见那一处括号补句与两个删去的从句,eval 只多出第 18 例,其 must_contain 每项都在 expected_output 里。
  • 需要你做的:受管面 Tier H(skills/**):请批准或合并。

What changes

  • skills/objectstack-ui/rules/dashboards.md lines 306–311 (a comment inside the os:check dataset example). "A currencyMode: 'record' amount refuses currency, and sum/avg/min/max unless grouped by its code field" now continues "(a parent-path currencyField admits none, objectstack-data → Field Types → Currency: measure its homeAmount field or the parent's summary)". The data skill's owner text is linked by name, not restated.
  • Paid for in the same comment (token ratchet, headroom 0 before): two clauses whose home is the package source are deleted.
    • "then the column carries currencyField (the per-row code column); a count never does": the result column's wire shape, documented on AnalyticsResult.fields[].currencyField in packages/spec/src/contracts/analytics-service.ts (lines 93–110) and produced at packages/services/service-analytics/src/analytics-service.ts:3666-3693. A dashboard author writes nothing from it.
    • "Not judged: currency over a dynamic field, a fixed code against the tenant's": the measure-currency check's non-judgements, stated in packages/services/service-analytics/src/measure-currency-coherence.ts (module header, "Not judged").
  • skills/objectstack-data/evals/objects-fields-relationships.json eval 18. An invoice whose lines' amount follows the invoice's currency_code through the master_detail (currencyField: 'invoice.currency_code'), the lookup alternative refused, the invoice subtotal a summary that declares its own record currency, and ERR_CURRENCY_CODE_REQUIRED for a blank parent code. must_contain: master_detail, currencyField: 'invoice.currency_code', iso_4217_currency, summary, ERR_CURRENCY_CODE_REQUIRED; must_not_contain: currencyMode: 'fixed', Field.lookup('invoice').
  • .changeset/32392-skills-parent-currency-path-follow-ups.md: '@objectstack/skills': patch, carrying both declaration lines.

Why

The card asked for the sentence to be written to what main does today ("edge 2 may have moved"). It has not moved. Read on origin/main 6538ba4:

  • Engine door. packages/objectql/src/record-currency-aggregate-door.ts:175-181: when the amount's currencyField resolves to a parent path, the door pushes a refusal before it looks at groupBy at all ("No groupBy admits it: a dotted group key is read as a column of this row, which holds no code"). The only exit is the roll-up's own recompute through that same master_detail (ROLLUP_AGGREGATE_OPTION), which no caller can set. The refusal text names the two remedies the new sentence names: a stored home-currency amount field, or a summary rolled up through the master_detail.
  • Test pinning it. packages/objectql/src/record-currency-guards.test.ts:496-519, "an aggregate over a child amount that follows its parent is refused whatever it groups by (ADR-0144 D6, Open item 14)": ungrouped, grouped by invoice.currency_code (string and object form) and grouped by invoice are each refused INVALID_FIELD. The same describe pins the parent's roll-up as one total per currency when grouped by the parent's own code (:526-536).
  • Analytics cube door. packages/services/service-analytics/src/cube-record-currency-door.ts:97-107 admits a grouping only when a dimension's column is the code field on the same object. For a path amount the code field is the dotted invoice.currency_code, while the dimension resolver (analytics-service.ts:4173-4198, assertRecordCurrencyGrouped) answers the last segment of a dimension's sql and the object that segment sits on, so no dimension can match. No analytics test pins a parent-path amount; this reading is from code. The engine door underneath refuses the aggregate regardless.
  • A path amount may declare homeAmount: record-currency-guards.test.ts:686-703 (gp_line.amount with currencyField: 'invoice.currency_code' and homeAmount), so "measure its homeAmount field" is reachable.

Business reason (from the card): an AI author building invoice dashboards over line items reads the dashboards rule; the old sentence led to a refused dashboard, and the data skill's new parent-path rule (PR #32384) had no eval measuring it.

Acceptance notes

  • The order's "package eval-shape check" does not exist for this bundle. ui/scripts/check-skill-eval-tokens.mjs (check:skill-eval-tokens) walks only skills/objectui/evals/*.json (its --list names ten files, none under skills/objectstack-data/), and no other script reads skills/objectstack-*/evals/. The README's shape was checked with a one-off script over the whole file: eval 18 is clean (every must_contain literal in expected_output, no must_not_contain literal in it), and each of its must_contain literals occurs in the data bundle's markdown (1 to 41 occurrences).
  • Pre-existing shape misses in the same file, not touched here: eval 11 (type: 'select', type: 'state_machine'), eval 12 (type: 'summary', type: 'formula') and eval 14 (label: '公司名称', value: 'active') carry must_contain literals absent from their expected_output. Noted, not filed: no gate reads this bundle's evals.
  • Analytics refusal prose for a path amount (read-only inference, not measured). For a parent-path amount the cube door's message would advise "add the dimension over 'invoice.currency_code'", a grouping the same door then refuses again (cube-record-currency-door.ts:109-125). Unmeasured through a public door here; the engine door's own message names the right remedies.

Verification

Head d57adb94 (merge of origin/main 3968a57 after #33427 took eval 17; ours renumbered to 18), first measured on 527f63ef over base 6538ba4; derived gates rerun on d57adb94: 42 exit 0, the same 2 NOT MEASURED.

Line and token budget (skills/**)
  • Net lines in skills/**: +23 / -4. skills/objectstack-ui/rules/dashboards.md: 474 to 474 lines, 24926 to 24902 bytes; token ratchet 6232 to 6226 (ceiling 6232, headroom 6). The first two wordings measured +19 and +13 over; the sentence was shortened and the two package-homed clauses deleted; no ceiling moved, no re-wrap counted as payment.
  • skills/objectstack-data/evals/objects-fields-relationships.json: 296 to 315 lines, 4463 to 4834 tokens (eval fixture, measured, not ratcheted).
  • Whole package, all skills/*/SKILL.md: 4602 to 4602 lines (no SKILL.md touched). Bundle total (whole shipped tree): 244310 to 244675 tokens (base computed from the two per-file deltas, -6 and +371).
  • node scripts/pm/check-skill-line-ratchet.mjs: exit 0. node scripts/check-skills-token-ratchet.mjs: exit 0.
Derived gates: 44 derived, 42 run green, 2 NOT MEASURED

node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 44 families for the three paths. Each was run with its exit code captured before any pipe, after building @objectstack/formula and @objectstack/lint under the verify lock (VERDICT command-exit 0, 90s):

  • 42 exit 0, among them check-adr-0087-registration (scan and --self-test), check-changeset-no-major, check-empty-changeset (scan and --self-test), check-skills-token-ratchet (scan and --self-test), @objectstack/lint check:doc-formula-expressions, check:doc-authoring, check:nul-bytes, check:pm-governed-merges, check:published-files, check:skill-compatibility, check:skill-frame-sync, check:skill-identifier-liveness, check:skill-links, check:dts-closure, check:sourcemap-no-sources-content.
  • NOT MEASURED, exit 3 PREREQUISITE NOT MET (each reads every package's dist/): check:dual-build-cjs-loads, check:lean-entry-closure. No package source is touched; CI builds and runs them.
  • --ran reconciliation: "44 derived famil(ies) accounted for — 42 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)".
  • Extra, not derived: pnpm --filter @objectstack/spec check:skill-examples exit 0 after building the @objectstack/client-react closure under the verify lock (VERDICT command-exit 0, 195s): "344 prose examples type-check across 3 surface(s)". That covers the edited os:check block.
  • CI families are read from this PR's check-runs, not re-run here.
Tier and governed readings
  • dispatch-gates --tier: MANDATORY contract-review tier, both skills/** paths under clause ① (the published catalog); no one-line exit for this surface.
  • node scripts/pm/check-governed-merges.mjs --branch claude/project-thread-z8yej2: exit 3, GOVERNED, landing tier H (人合). 2 of 3 paths hit the register (skills/** x2); the changeset is not on it. Size +33 / -4, under the 3000 threshold.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FEkQ5kJc3VU2HmGSE78u8t

…data eval for the parent-path currencyField

The dashboards rule said a record-currency amount refuses sum/avg/min/max
unless grouped by its code field; a master_detail child amount whose
currencyField is the parent path admits no grouping on main (the engine's
aggregate door and the analytics cube door both refuse it). Say so, point to
objectstack-data for the declaration, and name the home field or the parent's
summary as the shapes to measure. Paid for by deleting two clauses whose home
is the package source. Add the objects-fields-relationships eval case for an
invoice whose lines follow its currency.

Claude-Session: https://claude.ai/code/session_01FEkQ5kJc3VU2HmGSE78u8t
Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 14, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 527f63ef4d9aaf6aa382592ed64cf02fea908e2f
Local-runs: none
Scope: skills/objectstack-data/evals/objects-fields-relationships.json, skills/objectstack-ui/rules/dashboards.md + none

Inputs read: card #32392 (body, triage, claim, os-dev-report), PR #33394 (body, three-file list, net diff against merge-base 6538ba48fc4590402cd6280cf83a8902f6de83d3), the check-runs on the head. Cited code read on origin/main at b63c894934b5e427b456b997774f48a220edb7e5; none of the cited files moved between the merge-base and that tip. No file in the diff implements or enforces the two hits (no gate, schema or package source is touched), so the + set is empty. The changeset is the lane seat's ACCEPT.

① Derived judgments

  • Accept-set: none moves. No schema, no packages/** source, no gate, no error code. Right.
  • Public surface, @objectstack/skills (the shipped catalog; packages/skills/scripts/sync-catalog.mjs copies the whole skills/** tree, evals included):
    • objectstack-ui/rules/dashboards.md now says a currencyMode: 'record' amount whose currencyField is a parent path admits no grouping, and names two things to measure instead. Right. This brings the skill into line with main: packages/objectql/src/record-currency-aggregate-door.ts (assertRecordCurrencyAggregatesGrouped) pushes a path amount as a hit before it looks at grouped; the one exit is ROLLUP_AGGREGATE_OPTION, which is module-private. record-currency-guards.test.ts, in the describe "an aggregate over a child amount that follows its parent is refused whatever it groups by", pins all four shapes (ungrouped; 'invoice.currency_code' as a string and in object form; 'invoice') as INVALID_FIELD.
    • Two clauses are removed from the same comment: what the result column carries (currencyField; a count never does) and the "Not judged" pair. Right. Neither clause tells a dashboard author to write anything. The column shape is documented on AnalyticsResult.fields[].currencyField in packages/spec/src/contracts/analytics-service.ts, which also says "A count / count_distinct over the amount reads no amount and carries neither key". No other skill file or eval cites the removed text, so nothing is orphaned (checked with grep at the head).
    • objectstack-data evals: eval 17 is added. Right. It is the case the card's item 2 asks for.

② Semver level

  • The changeset '@objectstack/skills': patch matches the diff: a documentation sentence and one eval fixture in a package of the fixed group, with no API, schema or runtime change. Right.
  • Clause-②: no is on the PR body and the changeset, as the card's surface line requires. Metadata-protocol: none is on both too. Right: no key, value or metadata type an author writes changes.

③ Boundary flags

  • open_questions: empty. Nothing to answer.
  • Dev flag 1: no eval-shape check exists for this bundle. Confirmed by reading. My own literal check over the file at the head: eval 17 has all five must_contain literals in expected_output (master_detail, currencyField: 'invoice.currency_code', iso_4217_currency, summary, ERR_CURRENCY_CODE_REQUIRED). Neither must_not_contain literal appears in it (currencyMode: 'fixed', Field.lookup('invoice')). Answered, holds.
  • Dev flag 2: earlier shape misses in the same file. Confirmed independently. Eval 11 lacks type: 'select' and type: 'state_machine'; eval 12 lacks type: 'summary' and type: 'formula'; eval 14 lacks label: '公司名称' and value: 'active'. Each is in that eval's must_contain but absent from its expected_output. They predate this PR and this diff does not touch them. Escalated to the seat as a follow-up card for domain:skills (carrier none today).
  • Dev flag 3: the analytics cube door's remedy for a path amount. Confirmed by reading packages/services/service-analytics/src/cube-record-currency-door.ts on main. For a measure over a path amount, codePath is the dotted invoice.currency_code. The message advises "add the dimension over 'invoice.currency_code'". The resolver in analytics-service.ts (assertRecordCurrencyGrouped) reduces a dimension to its last segment, so that dimension can never match the dotted code field: the remedy names a grouping the same door refuses again. This is outside the diff and not reviewed here. Escalated to the seat as a follow-up card for the analytics lane. This PR's sentence names the correct remedies, the same two the engine door's own message names.
  • Dev flag 4: process deviations. The thread ran below the mandated tier; this record is the review at CONTRACT_REVIEW_TIER, which closes that flag. Neither the HTML-comment signature line, the empty assignees, nor the order of the changeset's declaration lines touches the contract. They are the seat's to note.

④ Design judgment

skills/objectstack-ui/rules/dashboards.md (lines 306 to 311 at the head), judged against the card's item 1 and main:

  • Claim: a parent-path currencyField admits no grouping. Holds at the engine door, as cited in ①. It also holds at the cube door: assertRecordCurrencyAggregatesGrouped in cube-record-currency-door.ts admits only when d.object === target.object && d.column === codeField. The analytics resolver hands it currencyConfig.currencyField as is (dotted), and a dimension column is a last segment, so no dimension matches. The draft-preview branch calls the same judgment. I read three attempts to break the claim against the code: a groupBy of the master_detail itself, a dotted dimension sql, and a parent-object dimension over currency_code. Each is refused on main: the engine door never consults groupBy for a path amount, and no dimension column equals the dotted code field.
  • Claim: measure its homeAmount field. Holds. homeAmount is admitted on a path amount: gp_line.amount in record-currency-guards.test.ts declares currencyField: 'invoice.currency_code' with homeAmount. The home field is dynamic, so neither door judges it. The cube door's own remedy for a record amount says the same.
  • Claim: measure the parent's summary. Holds. The admitted roll-up through the very master_detail registers (ruling A in the record-currency-aggregate-door.ts header). The same describe pins it as one total per currency when grouped by the parent's own currency_code.
  • Card constraints. One sentence: one parenthesis, met. No restatement of the owner text: the parenthesis points to objectstack-data, Field Types, Currency. That spelling matches the data skill's SKILL.md link label "Field Types" and the H3 "Currency" in rules/field-types.md, the convention field-types.md already uses back ("objectstack-ui → Dashboards"). The pointer sits inside an os:check TypeScript block, where a Markdown link would not render.
  • The two deletions. No guidance an author acts on is lost (see ①).

skills/objectstack-data/evals/objects-fields-relationships.json (eval 17), judged against the card's item 2 and main:

  • Prompt. It matches the scenario the card names: invoice lines whose amounts follow the invoice's currency, with the lookup path refused.
  • expected_output, sentence by sentence against rules/field-types.md (Currency) and the code on main:
    • "one hop to the parent's iso_4217_currency field": isRecordCurrencyCodeField in packages/spec/src/data/record-currency-path.ts.
    • "A lookup path is refused": refuseDishonestRecordCurrencyPath in object.zod.ts, segment 1 must be a master_detail.
    • "subtotal ... must declare its own currencyMode: 'record' with currencyField: 'currency_code'": collectRecordCurrencyPathErrors in stack.zod.ts, arm (b). A roll-up through that very master_detail that does not declare the parent's code field in record mode is an error.
    • "A blank invoice code refuses the line's amount (ERR_CURRENCY_CODE_REQUIRED)": the validate() test in record-currency-guards.test.ts pins that code at invoice.currency_code.
    • "currency_code cannot change until none does": the owner text in field-types.md.
    • Every sentence holds.
  • Shape. Clean (see ③). Ids run 1 to 17 with no gap.

Findings

  • must-fix: none.
  • should-fix: none.
  • nit N1 (dashboards.md): "or the parent's summary" reads as a second consolidated figure. The summary is itself a record-mode amount, so a sum or avg over it still needs a grouping by the parent's currency_code; only homeAmount gives one figure. The sentence's main clause already states that rule for every record amount, and the data skill's owner text is one pointer away, so correctness holds. Accepted as is, or a follow-up on the prose face.
  • nit N2 (eval 17):
    • must_not_contain Field.lookup('invoice') would also fail an answer that quotes the teammate's refused declaration in order to reject it. That is the file's existing pattern (evals 5 and 7 forbid overrides: the same way), so it is accepted.
    • The must_contain literal summary is weak (the prompt's word "subtotal" invites it anyway). It discriminates little but is harmless.
  • nit N3 (skills/objectstack-data/evals/README.md, outside the diff): the per-file topic list for objects-fields-relationships.json does not yet mention record currency. Optional follow-up on the prose face.

Nits alone end the round.

Gates (the head's check-runs are the verdicts): 48 check-runs, none pending: 30 success, 18 skipped, 0 failure, cancelled or timed out. The lint families (repo and tooling, CI release and engine, docs and code guards, ESLint), the type-check families and the core test shards are all green. Nothing red.

Implemented-by: claude/project-thread-z8yej2
Reviewed-by: session_01FEkQ5pjSPT7ui2EUcunaVb

VERDICT: PASS

Adopted by the seat 2026-11-14T18:43Z · isolated sub-agent at CONTRACT_REVIEW_TIER · Ruling-ref: Leehom card cmsg_01TenzsRopZj4jMbvjX8uz1XFhuiZmTH8VFgMmHRmpiGAb, option A, tapped 2026-11-14T15:37Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb

维护者速读

  • 改了什么:skills/objectstack-ui/rules/dashboards.md 第 306–311 行(os:check 块内注释)加一句:currencyField 为父路径的金额不接受任何分组,指向 objectstack-data 的 Currency 规则,替代做法是度量其 homeAmount 字段或父记录的 summary;为守 token 上限删去两条本该住在包源码里的从句(6232 → 6226)。objects-fields-relationships.json 新增 eval 17(发票行跟随发票币种,lookup 写法被拒)。外加一个 patch changeset。
  • 为什么改:旧句"按其币种字段分组则可"会让作者按路径分组,而 main 上引擎门在读 groupBy 前就拒绝路径金额(record-currency-aggregate-door.ts,record-currency-guards.test.ts 钉住四种分组);数据技能的父路径规则此前没有 eval。
  • 风险与回滚:只动技能文字与一个 eval 样例,不动 schema、运行时与门禁;回滚即还原本 PR。
  • 先看:skills/objectstack-ui/rules/dashboards.md 第 306–311 行,再看 eval 文件末尾的 eval 17。
  • 两分钟验证:git diff origin/main -- skills/,只见这两处与 changeset。
  • 需要你做的:受管面 Tier H(skills/**),契约复审 PASS 评论 6882437074(Head-sha 527f63ef4d9aaf6aa382592ed64cf02fea908e2f)已在案,请批准或直接合并。
  • 席位意见:可以合。新句与 eval 17 的每条断言都对得上 main 代码;复审顺带发现分析服务的拒绝提示自相矛盾,另立卡。

席位核对

Verdict: ACCEPT, held for the maintainer · head 527f63ef4d9aaf6aa382592ed64cf02fea908e2f · card #32392 · report 6882194334 · contract review 6882437074 (PASS on this head, CONTRACT_REVIEW_TIER; Ruling-ref for the in-seat review: Leehom card cmsg_01TenzsRopZj4jMbvjX8uz1XFhuiZmTH8VFgMmHRmpiGAb option A).

  • Shape: draft → main, Fixes #32392. skills/objectstack-ui/rules/dashboards.md (+4 / -4), skills/objectstack-data/evals/objects-fields-relationships.json (+19), one '@objectstack/skills': patch changeset. GOVERNED, Tier H (skills/**). Clause-②: no; Metadata-protocol: none.
  • Order assumption falsified, accepted: no repo check reads the shape of skills/objectstack-*/evals (check:skill-eval-tokens covers objectui only). The dev checked eval 17 by script and the review re-checked it: all five must_contain literals are in expected_output, neither must_not_contain literal is.
  • Changeset (TIER_DEFAULT): correct level for a docs sentence and an eval fixture.
  • Gates: 44 derived, 42 exit 0, 2 NOT MEASURED (dual-build-cjs-loads, lean-entry-closure; no package touched). Token ratchet 6226, no raise. Check-runs on the head: 48, 30 success, 18 skipped, none failing. Mergeable clean.
  • Accepted deviations (review nits): N1, "the parent's summary" is itself a record-currency amount, so only homeAmount gives one consolidated figure (the main clause already covers it); N2, eval 17's must_not_contain literal would also fail an answer that quotes the refused declaration to reject it (same pattern as evals 5 and 7), and its summary literal is weak; N3, the evals README topic list does not name record currency yet. Process: the thread ran on the session model and the tier was met by this in-seat review.
  • Follow-ups the seat files: (1) analytics lane: cube-record-currency-door.ts advises grouping by 'invoice.currency_code' for a parent-path measure, then refuses that grouping because the resolver keeps only a dimension's last segment; (2) domain:skills: evals 11, 12 and 14 of the same file already miss must_contain literals in their expected_output.
  • Landing: Tier H. The seat does not flip this PR ready or enqueue it. It needs the maintainer's merge, or an authorised APPROVED review after which the seat lands it.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 14, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 14, 2026 21:27
@os-zhuang
os-zhuang enabled auto-merge November 14, 2026 21:27
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 14, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 14, 2026
…-z8yej2

# Conflicts:
#	skills/objectstack-data/evals/objects-fields-relationships.json
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb

Seat delta check — PR #33394 @ d57adb94d63ec922848c817131d50e28bfe8b7b9

Verdict: ACCEPT stands on the new head (Tier H, held for the maintainer). It covers ACCEPT 6882448209 and contract review 6882437074, both on 527f63ef.


Generated by Claude Code

@os-zhuang
os-zhuang added this pull request to the merge queue Nov 14, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb

Correction: contract-review tier

The contract-review record(s) 6882437074 on this PR say Served-tier: CONTRACT_REVIEW_TIER, and the seat adopted them as "isolated sub-agent at CONTRACT_REVIEW_TIER". That is wrong. The seat launched the reviewing sub-agent without the tier, so it ran at the seat's own default tier, not at CONTRACT_REVIEW_TIER. The seat found this on its own audit. The review was still isolated and adversarial, and its findings stand as an off-tier review. They are not the at-tier record AGENTS.md and the in-seat review ruling require.

The seat re-runs the review at CONTRACT_REVIEW_TIER on this PR's head and posts that record here. Until it does, this PR has no at-tier record.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: d57adb94d63ec922848c817131d50e28bfe8b7b9
Local-runs: none
Scope: skills/objectstack-data/evals/objects-fields-relationships.json, skills/objectstack-ui/rules/dashboards.md + none

Inputs read: card #32392 (body and all four comments), PR #33394 (body, three-file list, net diff against main), the check-runs on the head. Cited code read on origin/main at 8e63ed877771d6f3492309e596fb5422b3f0898e; the two hits files differ from that tip by this diff alone (dashboards.md +4 / -4, the evals file +19). No file in the diff implements or enforces the two hits (no gate, schema or package source is touched), so the + set is empty. The changeset is the lane seat's ACCEPT at TIER_DEFAULT. This is the at-tier re-review: the earlier record 6882437074 and the seat delta check 6884866541 were not used as evidence; every reading below is from the tree.

① Derived judgments

  • Accept-set: nothing moves. No schema, no packages/** source, no gate, no error code. Right.
  • Public surface, @objectstack/skills (the shipped skills/** tree, evals included):
    • objectstack-ui/rules/dashboards.md gains one parenthesis: a parent-path currencyField admits no grouping; measure the amount's homeAmount field or the parent's summary. Right. It brings the rule into line with main (④).
    • The same comment loses two clauses: "then the column carries currencyField (the per-row code column); a count never does", and "Not judged: currency over a dynamic field, a fixed code against the tenant's". Right. Neither tells a dashboard author to write anything. The first is the result column's wire shape (enrichResultColumns in packages/services/service-analytics/src/analytics-service.ts); the second is the non-judgement list in the header of measure-currency-coherence.ts. No other file under skills/** at the head cites either clause, and the pointer back from objectstack-data/rules/field-types.md ("A dataset measure's currency (refused DATASET_INVALID): objectstack-ui → Dashboards") still lands on text that says so.
    • objectstack-data evals gain eval 18. Right. It is the case card item 2 asks for; evals 1 to 17 are untouched and ids run 1 to 18 with no gap.

② Semver level

  • '@objectstack/skills': patch matches what the diff publishes: one documentation sentence and one eval fixture, in a package of the fixed group, with no API, schema or runtime change. Right.
  • Clause-②: no and Metadata-protocol: none are on both the PR body and the changeset, as the card's surface line requires. Right: no key, value or metadata type an author writes changes meaning or acceptance.

③ Boundary flags

  • open_questions: empty. Nothing to answer.
  • Dev flag: no eval-shape check reads this bundle. Answered by a literal check of the file at the head: eval 18 carries all five must_contain literals in expected_output and neither must_not_contain literal. Holds.
  • Dev flag: older shape misses in the same file. Confirmed: eval 11 (type: 'select', type: 'state_machine'), eval 12 (type: 'summary', type: 'formula') and eval 14 (label: '公司名称', value: 'active') carry must_contain literals absent from their expected_output. They predate this PR and the diff does not touch them. Escalated to the seat as a domain:skills follow-up.
  • Dev flag: the cube door's remedy for a path amount. Confirmed by reading cube-record-currency-door.ts on main: for a path amount codePath is the dotted invoice.currency_code, and the message says "add the dimension over" that path, a grouping the same door cannot admit. Outside the diff, read and not reviewed. Escalated to the seat as an analytics-lane follow-up.
  • Dev flag: process deviations (thread model below the tier, the signed HTML comment, no assignees, declaration lines after the changeset title). None touches the contract; this record is the review at tier.
  • The earlier records (6882437074 on 527f63ef, delta 6884866541). Read only to answer them. Their must-fix and should-fix lists were empty, so no fix was owed on this head. Their three nits are confirmed below as N1 to N3; none is rejected. Their two escalations are the two confirmed above. The delta's claim that only the eval id moved (17 to 18) agrees with the tree: the eval body matches the PR's description and evals 1 to 17 equal main.

④ Design judgment

skills/objectstack-ui/rules/dashboards.md (lines 306 to 313 at the head), against card item 1 and main:

  • "a parent-path currencyField admits none". Holds at both doors.
    • Engine: assertRecordCurrencyAggregatesGrouped in packages/objectql/src/record-currency-aggregate-door.ts resolves the path with recordCurrencyPathOf and pushes the amount as a hit before grouped is consulted. The one exit is rollupVia === path.via, fed by the module-private ROLLUP_AGGREGATE_OPTION. record-currency-guards.test.ts pins ungrouped, 'invoice.currency_code' (string and object form) and 'invoice' as INVALID_FIELD.
    • Analytics: assertRecordCurrencyGrouped hands the cube door currencyConfig.currencyField as declared (the plugin's sourceFieldMeta relays it verbatim under record), so codeField is dotted. A dimension resolves to its last segment on the hopped object, and the door admits only d.object === target.object && d.column === codeField. Three attempts to break it, read against the code: a dimension over invoice.currency_code (column currency_code on invoice, wrong on both tests), a dimension over the master_detail itself (column invoice), a bare currency_code dimension on the line (the line holds no such column, and the column is not the dotted code field). None is admitted.
  • "measure its homeAmount field". Holds. A path amount may declare homeAmount and the projection fills it (gp_line in record-currency-guards.test.ts: amount_home stored for a line following invoice.currency_code). The home field is a dynamic currency, which neither door judges.
  • "or the parent's summary". Holds as a thing that may be measured: the roll-up through that very master_detail registers (ruling A, the door's header). See N1 for what it leaves unsaid.
  • Card constraints. One sentence: one parenthesis. No restatement of the owner text: it points to objectstack-data → Field Types → Currency, which is the ### Currency section of rules/field-types.md holding "A line in its parent's currency", in the spelling that file uses for its pointer back. "True to main when picked up": edge 2 has not moved at 8e63ed87.
  • What stays. The sentence's lead ("refuses currency, and sum/avg/min/max unless grouped by its code field") is unchanged and still true for a sibling code field. The block is a comment inside an os:check example; the type-check families on the head are green.

skills/objectstack-data/evals/objects-fields-relationships.json (eval 18), against card item 2 and main:

  • Prompt. The scenario the card names: invoice lines whose amounts follow the invoice's currency, the lookup alternative refused.
  • expected_output, sentence by sentence:
    • "currencyMode: 'record' and currencyField: 'invoice.currency_code' ... one hop to the parent's iso_4217_currency field": refuseDishonestRecordCurrencyPath (packages/spec/src/data/object.zod.ts) admits exactly two segments starting at a master_detail; isRecordCurrencyCodeField (record-currency-path.ts) requires valueDomain: 'iso_4217_currency' on segment 2. Holds.
    • "A lookup path is refused": the same function, the viaField.type !== 'master_detail' arm, with a message written for lookup. Holds.
    • "subtotal is a summary with function: 'sum' ... must declare its own currencyMode: 'record' with currencyField: 'currency_code'": collectRecordCurrencyPathErrors (stack.zod.ts), arm (b), refuses any other declaration, a missing one included. Holds.
    • "A blank invoice code refuses the line's amount (ERR_CURRENCY_CODE_REQUIRED)": CURRENCY_CODE_REQUIRED_CODE in validation/record-currency-code.ts, pinned at invoice.currency_code by the guards test. Holds.
    • "the invoice's currency_code cannot change until none does": record-currency-parent-lock.ts. Holds.
  • Agreement with the skill it measures. Every claim is taught in rules/field-types.md (Currency), and each must_contain literal occurs in that section, so the eval measures the rule and not outside knowledge.
  • Shape. The README's: id, prompt, expected_output, files, assertions; literals clean (③).

Findings

  • must-fix: none.
  • should-fix: none.
  • nit N1 (dashboards.md): "or the parent's summary" does not say that the roll-up is itself a record-mode amount. A sum of it over invoices is refused unless grouped by the invoice's currency_code (pinned in the guards test: "refused ungrouped, one total per currency grouped by its code"); only homeAmount gives one consolidated figure. The sentence states nothing false: its own lead clause gives that rule for every record amount, the summary's author had to declare currencyMode: 'record' on it, and the engine's refusal names the remedy. Accepted deviation, or a follow-up on the prose face (the file has 6 tokens of headroom).
  • nit N2 (eval 18): the must_contain literal master_detail fails an answer written only in the builder spelling the owner text itself shows (Field.masterDetail('invoice')), and must_not_contain Field.lookup('invoice') fails an answer that quotes the teammate's declaration in order to refuse it. Both follow the file's existing pattern (evals 2, 8 and 17 require master_detail). summary discriminates little. Accepted.
  • nit N3 (skills/objectstack-data/evals/README.md, outside the diff): the topic list for this file does not name record currency. Optional follow-up on the prose face.

Nits alone end the round.

Gates (the head's check-runs are the verdicts): 48 check-runs, none pending: 30 success, 18 skipped, none failed, cancelled or timed out. The lint, type-check, core test, changeset, PR-body guard and governed-surface queue guard families are green.

Implemented-by: claude/project-thread-z8yej2
Reviewed-by: session_01FEkQ5pjSPT7ui2EUcunaVb

VERDICT: PASS

Adopted by the seat 2026-11-15T00:30Z · isolated sub-agent at CONTRACT_REVIEW_TIER (served model verified by the seat) · Ruling-ref: Leehom card cmsg_01TenzsRopZj4jMbvjX8uz1XFhuiZmTH8VFgMmHRmpiGAb, option A, tapped 2026-11-14T15:37Z

Merged via the queue into main with commit 6e23180 Nov 15, 2026
48 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-z8yej2 branch November 15, 2026 00:44
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…d in the controlled_by_parent rules (objectstack-ai#33427)

<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XGTRqkadkLaQzmJ9NBj9UKs)_

Fixes objectstack-ai#33374

domain:skills#1 · os-project-manager · session_01FEkQ5pfprxUTKxctsoaYzF

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 改了什么:`objectstack-data`
技能的关系规则(`rules/relationships.md`)原来只教「明细的每次写入都要主记录的编辑权,唯一开关是
`ownerMayEdit`」,现在补上第二个开关
`writeRequiresMasterRead`:打开后,能读主记录的人按明细对象自己的权限、行级与字段级安全新增、修改、删除;默认不变。同时写明三处拒绝(与
`ownerMayEdit: true` 同时声明、非 `controlled_by_parent`
对象、写在上一层)、所有权底线仍约束批量写与代他人写、相关 lint 在该明细上不报。eval 新增第 17 例。
- 为什么改:PR objectstack-ai#33369 已在 `main` 上线这个键,技能文字却仍说「每次写入都要主记录编辑权」,AI
作者照着写会错过这个开关,或把它写到非明细对象上被拒。
- 风险与回滚:纯技能文字与 eval,不动 schema 与运行时;`relationships.md` token 4127 到
4127(上限 4127,零余量),新增文字由删去 lookup 与多对多示例里的两段样板父对象付账;回滚即还原本 PR。
- 先看:`skills/objectstack-data/rules/relationships.md` 的「Writes under
`controlled_by_parent` — two opt-ins」一节;再看 eval 文件末尾第 17 例。
- 两分钟验证:`node scripts/check-skills-token-ratchet.mjs`,预期 exit
0、`relationships.md is 4127 tokens (ceiling 4127; headroom 0)`。
- 需要你做的:受管面 Tier H(`skills/**`):请批准或合并。

## What changes

- **`skills/objectstack-data/rules/relationships.md`, the rule's home.**
The section "Owner edits under `controlled_by_parent` — `ownerMayEdit`"
becomes "Writes under `controlled_by_parent` — two opt-ins". By default
every write needs edit on the master. `ownerMayEdit: true` keeps its old
meaning (the row owner's by-id update only). `writeRequiresMasterRead:
true` is new: whoever reads the master inserts, updates and deletes the
detail under the detail's own object permissions, RLS and FLS, re-points
and each opted-in chain hop too; on behalf of another user, both users
must read the master. The ownership floor (rows the caller created)
still binds predicate and on-behalf-of updates and deletes (N3). Refused
beside `ownerMayEdit: true`, off a `controlled_by_parent` object, and
one level up (`sharing.KEY`). The lint
`security-controlled-by-parent-owner-policy-without-opt-in` is silent on
such a detail. The code example shows the new key with "or ownerMayEdit"
so the refused pair is never copied as one literal.
- Same file, two sentences the new key made incomplete: the relationship
table's Sharing cell ("owner opt-in `ownerMayEdit`" to "read-on-master
opt-ins (below)"), and the optional-master paragraph (setting or
emptying a master asks read under `writeRequiresMasterRead`, edit even
under `ownerMayEdit`).
- **Paid in the same file** (token ratchet headroom 0 before): the
lookup example's parent `account` object and the junction example's two
side objects (`project`, `employee`), each a name-only
`ObjectSchema.create`, are replaced by one comment naming them. They
taught nothing the surrounding prose and the child objects do not.
- **`skills/objectstack-data/evals/objects-fields-relationships.json`
eval 17.** Order lines anyone who can see the order may add, change or
remove: `controlled_by_parent` with `writeRequiresMasterRead: true`, not
`ownerMayEdit`, not one level up. `must_contain`:
`controlled_by_parent`, `master_detail`, `controlledByParent`,
`writeRequiresMasterRead: true`; `must_not_contain`: `sharing: {
writeRequiresMasterRead`. The set already covered the master-edit rule
(eval 2, `ownerMayEdit`), so the order's condition for adding one holds.
- **`.changeset/33374-skills-teach-write-requires-master-read.md`**:
`'@objectstack/skills': patch`, both declaration lines.
- Not touched, after reading each on `origin/main`:
`skills/objectstack-data/SKILL.md` (its `controlled_by_parent` row says
"inherited from the master record", still true),
`references/lint-rules.md` (does not list the owner-policy lint),
`skills/objectstack-ui/rules/record-page.md` (an `os:check` example, no
write rule stated). No restatement outside the rule's home.

## Why

Read on `origin/main` b462444 (PR objectstack-ai#33369 merged), not from the card's
summary:

- **Key and refusals**: `packages/spec/src/data/object.zod.ts:3162-3195`
(`refuseControlledByParentWriteRequiresMasterReadMisplaced`: refused off
`controlled_by_parent`, refused beside `ownerMayEdit: true` with "Delete
ownerMayEdit; writeRequiresMasterRead already admits the owner"),
`:4244-4246` (strict `sharing` block's guidance for the key one level
up), `:4210-4216` (read on the master is the master question for every
write; absent or `false`, master edit).
- **Per hop and every write path**: PR objectstack-ai#33369's body and changeset
`.changeset/33250-controlled-by-parent-write-requires-master-read.md`
(insert single and batch, by-id and predicate update and delete,
re-point and emptying, each hop whose detail opted in; on-behalf-of asks
each context). The body-named master goes through the same chain walk
(`security-plugin-cbp-write-gate.ts:540-553`, `askBodyNamedMaster` calls
`assertControlledByParentChainEditable`).
- **Ownership floor (N3)**: PR objectstack-ai#33369 Acceptance notes ("Predicate
(multi-row) update/delete keep the platform ownership floor ... only
by-id writes hand that floor to the master gate"); the delegated path
keeps it (`security-plugin-authz-middleware.ts:740-746`,
`delegatorOwnWriteFloorOptions`). Confirmed identical with the objectstack-ai#33373
ADR-0055 amendment thread (branch `claude/project-thread-mllmvl`).
- **Lint**: the changeset's `@objectstack/lint` paragraph (no new rule;
the owner-policy arm stands down on a declaring detail).
- **N1**: no "byte for byte" wording; the text says "by default".

Ruling: Leehom 2026-11-14, A+ (record 6880588685 on objectstack-ai#33250):
「开关打开后,能读主记录的人按子对象自己的授权新增、修改、删除,默认不变。」

## Acceptance notes

- **Eval id 17 collides with PR objectstack-ai#33394** (objectstack-ai#32392, awaiting merge), which
also appends eval 17 to the same file. Whichever lands second merges
`origin/main` and renumbers to 18; the order expected this.
- **Heading anchor changed**:
`#owner-edits-under-controlled_by_parent--ownermayedit` is gone. `git
grep` over the whole tree finds no link to it.
- **Not stated in the skill, on purpose**: the refusal shapes for a
non-reader (insert and re-point `403 PERMISSION_DENIED`, by-id update
and delete `404 RECORD_NOT_FOUND`) and the lifecycle verbs. They live in
the ADR amendment (objectstack-ai#33373) and the permissions docs; the file has no
headroom for them.

## Verification

Head `4629a84a`, base `origin/main` b462444.

<details><summary>Line and token budget (skills/**)</summary>

- `skills/objectstack-data/rules/relationships.md`: 419 to 399 lines,
16505 to 16508 bytes; token ratchet 4127 to 4127 (ceiling 4127, headroom
0). Paid by deleting three boilerplate parent objects; no ceiling moved,
no re-wrap counted as payment. First wording measured +14 tokens over
and was shortened.
- `skills/objectstack-data/evals/objects-fields-relationships.json`: 296
to 313 lines, 17850 to 19199 bytes (eval fixture, measured, not
ratcheted).
- Whole package, all `skills/*/SKILL.md`: 4602 to 4602 lines (no
SKILL.md touched).
- `node scripts/pm/check-skill-line-ratchet.mjs`: exit 0. `node
scripts/check-skills-token-ratchet.mjs`: exit 0.

</details>

<details><summary>Derived gates: 44 derived, 42 run green, 2 NOT
MEASURED</summary>

`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived 44 families for the three paths.
Each was run on head `4629a84a` with its exit code captured before any
pipe, after building `@objectstack/formula` and `@objectstack/lint`
under the verify lock (VERDICT command-exit 0, 104s):

- 42 exit 0, among them `check-skills-token-ratchet` (scan and
`--self-test`), `check-empty-changeset` (scan and `--self-test`),
`check-changeset-no-major`, `check-adr-0087-registration`,
`@objectstack/lint check:doc-formula-expressions`,
`check:doc-authoring`, `check:nul-bytes`, `check:pm-governed-merges`,
`check:published-files`, `check:skill-compatibility`,
`check:skill-frame-sync`, `check:skill-identifier-liveness`,
`check:skill-links`, `check:dts-closure`,
`check:sourcemap-no-sources-content`.
- NOT MEASURED, exit 3 PREREQUISITE NOT MET (each reads every package's
`dist/`): `check:dual-build-cjs-loads`, `check:lean-entry-closure`. No
package source is touched; CI builds and runs them.
- `--ran` reconciliation: "44 derived famil(ies) accounted for — 42 run,
2 NOT-MEASURED (2 DERIVED from a recorded exit 3)".
- `check:skill-examples` is not derived and not run: no `os:check` block
is touched.
- CI families are read from this PR's check-runs, not re-run here.

</details>

<details><summary>Tier and governed readings</summary>

- `dispatch-gates --tier`: MANDATORY contract-review tier, both
`skills/**` paths under clause ① (the published catalog); no one-line
exit for this surface. This thread ran at the claim's default model; the
seat's in-seat contract review is the owed record.
- `node scripts/pm/check-governed-merges.mjs --branch
claude/project-thread-jqd53n`: exit 3, GOVERNED, landing tier H (人合). 2
of 3 paths hit the register (`skills/**` x2); the changeset is not on
it. Size +47 / -40, under the 3000 threshold.

</details>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01FEkQ5pfprxUTKxctsoaYzF

<!-- signed: domain:skills#1 · os-project-manager ·
session_01FEkQ5pjSPT7ui2EUcunaVb -->

Co-authored-by: Claude <noreply@anthropic.com>
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…medFrom (objectstack-ai#33480)

<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XN1KQUNRJ7VHD5gA6zvtVHD)_

Fixes objectstack-ai#33044

domain:skills#1 · os-project-manager · session_01FEkQ5k9eHen9BJozXn3f7Q

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 改了什么:`skills/objectstack-data/rules/security.md` 的「Renaming or
removing a shipped access item」节末新增一段:岗位改名要在新岗位上声明 `renamedFrom:
['old_name']`,不要删了重建;启动时平台在每个组织里把旧名的持有人(`sys_user_position`)挪到新名,幂等;只挪持有人,共享规则/队列/记录共享接收方、待审批人、邀请里的旧名只在启动日志里列给管理员;列出不挪的五种情况。
- 为什么改:PR objectstack-ai#33008 给 `PositionSchema` 加了 `renamedFrom`,但对外发布的技能没教,AI
写应用时改岗位名会删了重建,所有持有人静默失去权限集。
- 风险与回滚:纯技能文本(+1 changeset),不动代码与 schema;token
天花板未抬,在同一文件里删等量的示例和旁注付账;回滚即还原本 PR。
- 先看:`skills/objectstack-data/rules/security.md`
文末新段;其次同文件的付账删减(下方表格逐条列出去处)。
- 两分钟验证:`node scripts/check-skills-token-ratchet.mjs | grep
rules/security.md`,预期 `3959 / 3959`,exit 0。
- 需要你做的:受管面 Tier H(`skills/**`):请批准或合并。

## What changes

`skills/objectstack-data/rules/security.md`, § Renaming or removing a
shipped access item, gains one paragraph, **Renaming a position**:

- declare `renamedFrom: ['old_name']` on the renamed position, never
delete and re-add (holders name a position by its bare name, so a
deleted one leaves them granted nothing);
- at boot the old name's holders (`sys_user_position`) move to the new
name in every organization, idempotently;
- holders only: the boot log lists the old name's other references
(sharing-rule, queue and record-share recipients, pending approvers,
invitations) for an administrator;
- not carried, warned: an old name still a position anywhere, claimed
twice, recorded under another package, switched off, or a disabled
claimant.

One changeset, `.changeset/33044-skills-position-renamed-from.md`,
`'@objectstack/skills': patch`.

### Paid in place (token ceiling unchanged)

`rules/security.md` was 15828 bytes (3957 tokens, ceiling 3959, headroom
2) on the merge base `34c05229`; it is now 15834 bytes, 3959 tokens,
headroom 0. The card carries no maintainer words that order the text, so
no raise; the new paragraph is paid by deletions in the same file:

| Cut | Where the fact still lives |
|---|---|
| `(ADR-0090 D12)` after the delegated-admin clause | ADR-0090 |
| `(explaining another user needs manage_users)` | an operator detail of
the explain door, not an authoring rule; its contract is
`packages/spec/src/security/explain.zod.ts` |
| `(no read on the roster needed)` on membership keys | "as a system
read" in the same sentence says it |
| the `com.acme.crm` / `hd_agent` example of `outside-closure` | eval
`hooks-security-seeds-datasources.json` asks exactly this scenario; the
rule sentence stays |
| the `hr` / `ops` / `auditor` example of `ambiguous-in-closure` |
illustrative; the install refusal of a second shipper is KEPT (that eval
expects it) |
| `Ciphertext lives in sys_secret, only an opaque ref on the row.` |
`rules/field-types.md` `secret` row (encrypted at rest, masked,
fail-closed, ADR-0100) |
| `e.g. identity tables a plugin writes via its own adapter
(sys_sso_provider, OAuth clients)` and `(adapter-written rows often lack
it)` | plugin-internal; the rule (a null `organization_id` row is
denied) stays |
| `— the list renders empty` | UI symptom of the denial stated beside it
|
| `an app-declared default profile, a customer-authored set` | "any set
with a wildcard read grant" states the rule; `viewer_readonly` and the
`member_default` contrast stay |

Whole-file reading: 327 → 329 lines, 3957 → 3959 tokens. Whole-package
reading (every `skills/**/SKILL.md`): unchanged, no `SKILL.md` is
touched (4602 lines at the merge base).

## Acceptance notes

Every claim in the paragraph was read from the code on `origin/main`
(`34c05229`):

| Claim | Read from |
|---|---|
| `renamedFrom` is a list of earlier position names |
`packages/spec/src/identity/position.zod.ts` (`renamedFrom`, its JSDoc
and `.describe`) |
| own name / repeated entry refused at parse; still-declared and
claimed-twice refused per collection |
`packages/spec/src/identity/position-renamed-from.ts`
(`refuseSelfRenamedFrom`, `refuseDishonestPositionRenamedFrom`) |
| moves holders at boot, as the system, every organization, `position`
column only, idempotent |
`packages/plugins/plugin-security/src/position-renamed-holder-carry.ts`
header § What it does |
| the six boot refusals (`claimed-twice`, `claimant-disabled`,
`still-declared`, `held-by-other`, `owned-by-other`, `switched-off`),
each logged at `warn`, holders left | same file, `PositionRenameRefusal`
and `logPositionRenameCarry` |
| other references named, never rewritten: sharing-rule, queue-member
and record-share recipients, pending approver slots, pending
invitations, activation-ledger rows | same file, header § What it names
and never writes, and the `leftBehind` warning |
| deleting the position leaves holders granted nothing | same file,
header § Why |

- The code also carries after a marketplace hot install or upgrade
(`metadata:reloaded`, objectstack-ai#33238); the paragraph says "at boot" only, which
always holds, since a reload carries a narrower scope and some install
doors do not announce a reload.
- Not taught (detail an author does not act on): a holder who already
holds the new name keeps both rows and is warned; a failed row write is
retried at the next boot.
- Serial constraints held: this PR does not touch
`skills/objectstack-data/evals/objects-fields-relationships.json` (PR
objectstack-ai#33394) or `skills/objectstack-data/SKILL.md` (PR objectstack-ai#33458). No eval
added: no existing eval asks about renaming a position.

## Verification

<details><summary>Derived gates on head 47d3f8e (42 of 44 exit 0, 2 NOT
MEASURED)</summary>

`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived 44 commands; each ran with its exit
captured before any pipe. `--ran`: "44 derived famil(ies) accounted for
— 42 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)".
`check:doc-formula-expressions` ran after `turbo run build
--filter=@objectstack/formula --filter=@objectstack/lint` under the lock
(VERDICT command-exit 0). `check:dual-build-cjs-loads` and
`check:lean-entry-closure` read every package's `dist/` and exit 3
without a full build; this diff touches no package, so no build closure
is owed and CI measures them.

```
node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0
node scripts/check-adr-0087-registration.mjs --self-test :: exit 0
node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/check-doc-route-spelling.mjs --advisory :: exit 0
node scripts/check-doc-route-spelling.mjs --self-test :: exit 0
node scripts/check-dts-emitted.mjs --self-test :: exit 0
node scripts/check-empty-changeset.mjs --base origin/main :: exit 0
node scripts/check-empty-changeset.mjs --self-test :: exit 0
node scripts/check-skills-token-ratchet.mjs :: exit 0
node scripts/check-skills-token-ratchet.mjs --self-test :: exit 0
node scripts/ci/assert-turbo-remote-cache.mjs --self-test :: exit 0
node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0
node scripts/ci/prune-turbo-cache.mjs --self-test :: exit 0
node scripts/ci/snapshot-next.mjs --self-test :: exit 0
node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0
node scripts/release-pending-publish.mjs --self-test :: exit 0
pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0
pnpm check:agent-test-spelling :: exit 0
pnpm check:changeset-gate-self-tests :: exit 0
pnpm check:ci-filter-parity :: exit 0
pnpm check:closed-ceremony-text :: exit 0
pnpm check:corpus-claim-drift :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:doc-authoring :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:dts-closure :: exit 0
pnpm check:dual-build-cjs-loads :: exit 3
pnpm check:gitlink-declared :: exit 0
pnpm check:lean-entry-closure :: exit 3
pnpm check:nul-bytes :: exit 0
pnpm check:pm-governed-merges :: exit 0
pnpm check:pm-skill-id-lint :: exit 0
pnpm check:published-files :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:role-word :: exit 0
pnpm check:skill-compatibility :: exit 0
pnpm check:skill-frame-sync :: exit 0
pnpm check:skill-identifier-liveness :: exit 0
pnpm check:skill-links :: exit 0
pnpm check:sourcemap-no-sources-content :: exit 0
pnpm check:watch-hint-literal :: exit 0
node scripts/pm/check-skill-line-ratchet.mjs :: exit 0
```
`check:dts-closure` and `check:sourcemap-no-sources-content` exit 0 over
the packages built here only (formula, lint and their closure).
</details>

<details><summary>Tier and governed-merge verdicts</summary>

- `dispatch-gates --tier`: MANDATORY contract-review tier for
`skills/**` (no one-line exit). This card thread ran on the claim's
default tier; named as a deviation in the report, and the seat's in-seat
contract review at tier is the owed record.
- `check-governed-merges.mjs --branch claude/project-thread-6ouxnr`:
exit 3, GOVERNED, landing tier H (人合), `skills/** ×1`; 52 changed lines,
under the 3000 threshold.
- Changeset: `'@objectstack/skills': patch` (`skills/**` ships in
`@objectstack/skills`).
</details>

---
_Generated by [Claude
Code](https://claude.ai/code/session_01FEkQ5k9eHen9BJozXn3f7Q)_

<!-- signed: domain:skills#1 · os-project-manager ·
session_01FEkQ5pjSPT7ui2EUcunaVb -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…i#33458)

<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1X13WJLvJKXyx6BgqdzPrLLZ)_

Fixes objectstack-ai#32974

domain:skills#1 · os-project-manager · session_01FEkQ5nzn5SncinMdswdSzM

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 改了什么:`objectstack-data` 技能的对象能力表(`enable`)加一行
`aiReadable`:只用于平台系统对象(`sys_*`,不含
`sys_metadata`、`sys_metadata_history`),开放只读 AI
访问(查询、取单条、聚合、describe、列表,永不写);应用对象从不声明它,连 `false` 也会在解析时被拒。
- 为什么改:objectstack-ai#32971 新增了 `enable.aiReadable`,技能文字没教,AI
照着能力表写应用对象时既不知道它存在,也不知道写在业务对象上会被拒。
- 风险与回滚:纯技能文字,一个文件加 1 行,外加一个 `@objectstack/skills` patch changeset;不动
schema、不动运行时;回滚即还原本 PR。
- 先看:`skills/objectstack-data/SKILL.md` 第 121 行(能力表最后一行)。
- 两分钟验证:`git diff origin/main -- skills/`,预期只见能力表末尾新增 `aiReadable`
一行,默认列为 `—`。
- 需要你做的:受管面 Tier H(`skills/**`):请批准或合并。

## What changes

- **`skills/objectstack-data/SKILL.md`, Object Capabilities (`enable`)
table**, one row after `clone`:

`| aiReadable | — | Platform sys_* objects only (not sys_metadata,
sys_metadata_history): read-only AI access (query, get, aggregate,
describe, list; no write). App objects never declare it, false included:
refused at parse |`

(backticks around the identifiers in the file). The Default column reads
`—`, not `false`: an absent key is closed, and writing `false` on an app
object is itself refused, so a `false` default would invite the one
value that fails.
- **`.changeset/32974-skills-enable-ai-readable-row.md`**:
`'@objectstack/skills': patch`, carrying both declaration lines.

## Why

Read on `origin/main` ba35dfd,
`packages/spec/src/data/ai-read-exposure.ts`:

- `aiReadExposureRefusal(objectName, enable)` judges any declared value
(`false` included; only an absent or `undefined` key passes) in this
order: first the stored-metadata family (`isStoredMetadataBodyObject`,
`STORED_METADATA_BODY_OBJECTS` = `sys_metadata`, `sys_metadata_history`,
in `packages/spec/src/kernel/stored-metadata-body-objects.ts`) is
refused whatever the key says; then a `sys_` name (`/^sys_/i`) is
accepted; every other name is refused ("is not a system object ...
Remove it").
- `ObjectSchema`'s refinement calls it through
`refuseMisplacedAiReadExposure` (`object.zod.ts`), so every door that
parses an object refuses it: `ObjectSchema.create`, `defineStack`, `os
validate` and the object save door.
- `isAiReadExposed(schema)` answers `true` only for the boolean `true`
on a `sys_*` object outside that family.
- The key is live after objectstack-ai#32442: `isAiReadExposed` is read by
`packages/runtime/src/domains/mcp.ts`,
`packages/mcp/src/mcp-http-tools.ts` and
`packages/mcp/src/stdio-data-bridge.ts`, and two platform objects
declare it (`sys_user` in `platform-objects`, `sys_approval_request` in
`plugin-approvals`). The `.describe` text in `ObjectCapabilities` says
the same as the new row.

## Acceptance notes

- No eval is added or extended: no eval under
`skills/objectstack-data/evals/` asks for the `enable` table (the only
`trackHistory` hit is a `must_not_contain` in a lifecycle eval), and
`objects-fields-relationships.json` and `rules/relationships.md` belong
to open PRs objectstack-ai#33394 and objectstack-ai#33427 and are untouched.
- The order expected `SKILL.md` might sit at its token ceiling; measured
headroom was 59 tokens before the row and 0 after, so no other text was
cut and no ceiling moved. The review round's fix (naming the two refused
objects) was paid inside the row itself (`never a write` to `no write`,
`An app object never declares` to `App objects never declare`).

## Verification

Head `fa4ef05c`, base `origin/main` ba35dfd.

<details><summary>Line and token budget (skills/**)</summary>

- `skills/objectstack-data/SKILL.md`: 477 to 478 lines, 26441 to 26678
bytes; token ratchet 6606 to 6665 (ceiling 6665, headroom 0). No ceiling
raised.
- Whole package, all `skills/*/SKILL.md`: 4602 to 4603 lines, 235787 to
236024 bytes. Bundle total (whole shipped tree): 244310 to 244369
tokens.
- `node scripts/pm/check-skill-line-ratchet.mjs`: exit 0. `node
scripts/check-skills-token-ratchet.mjs`: exit 0.

</details>

<details><summary>Derived gates: 46 derived, 44 run green, 2 NOT
MEASURED</summary>

`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived 46 families for the two paths; each
was run with its exit code captured before any pipe.

- 41 exit 0 on the first run, among them `check-adr-0087-registration`,
`check-empty-changeset`, `check-skills-token-ratchet` (scan and
`--self-test` each), `@objectstack/spec check:skill-docs`,
`check:doc-authoring`, `check:nul-bytes`, `check:pm-governed-merges`,
`check:published-files`, `check:skill-compatibility`,
`check:skill-frame-sync`, `check:skill-identifier-liveness`,
`check:skill-links`.
- `@objectstack/lint check:doc-formula-expressions`: first exit 3 (no
lint dist); exit 0 after `pnpm --filter "@objectstack/lint..." build`
under the verify lock (VERDICT command-exit 0, 89s; rebuilt for head
fa4ef05, 73s).
- `check:dts-closure` and `check:sourcemap-no-sources-content`: first
exit 3, then exit 0 after that build, sweeping only the 5 built
packages, not every package's `dist/`.
- NOT MEASURED, exit 3 PREREQUISITE NOT MET (every package's `dist/`):
`check:dual-build-cjs-loads`, `check:lean-entry-closure`. No package
source is touched, so no full build was paid; CI builds and runs them.
- `--ran`: "46 derived famil(ies) accounted for — 44 run, 2 NOT-MEASURED
(2 DERIVED from a recorded exit 3)".
- CI families are read from this PR's check-runs, not re-run here.

</details>

<details><summary>Tier and governed readings</summary>

- `dispatch-gates --tier`: MANDATORY contract-review tier, `skills/**`
under clause ① (the published catalog); no one-line exit for this
surface.
- `node scripts/pm/check-governed-merges.mjs --branch
claude/project-thread-7ha66d`: exit 3, GOVERNED, landing tier H (人合). 1
of 2 paths on the register (`skills/**`); the changeset is not. Size +11
/ -0, under the 3000 threshold.

</details>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01FEkQ5nzn5SncinMdswdSzM

<!-- signed: domain:skills#1 · os-project-manager ·
session_01FEkQ5pjSPT7ui2EUcunaVb -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…and refuses by code (objectstack-ai#33488)

<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XGXLb9PDJwB4m9YQYXKR1Y1)_

Fixes objectstack-ai#33257

domain:skills#1 · os-project-manager · session_01FEkQ5njvc1ya6PypTHRBe5

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 改了什么:`objectstack-data` 技能的 hook 参考文档「Declared
refusals」一节,开头改为一条规则:执行业务规则的 hook 声明 `refusals` 目录、每条规则一个代码、body
抛出该代码;没有目录时随手抛的文字错误会被平台答成
`HOOK_ABORTED`,只适合意料之外的失败。示例换成跨对象状态守卫「只有在库资产才能借出」(`ASSET_NOT_IN_STOCK`,409),并写明今天只有沙箱
`js` body 能声明 `refusals`,`handler` 写法(含内联 TS)保存时被拒。`rules/validation.md`
里指向该文档的税号 hook 示例同步改为声明 `TAX_ID_BLOCKED` 并抛代码。
- 为什么改:一次画廊场景实测里,AI 用 hook 正确拦下了「维修中的资产借出」,但抛的是无代码的文字错误,线上得到平台通用的
`HOOK_ABORTED`,用户与 agent 都拿不到有意义的代码和译文;技能原文的验证规则示例恰好教的就是这种写法。
- 风险与回滚:纯技能文字,两文件 +47 / -29 行,token 在各自文件内用删除重复内容付清,未抬任何上限;不动
schema、不动运行时;回滚即还原本 PR。
- 先看:`skills/objectstack-data/references/data-hooks.md` 的「Declared
refusals」一节;再看 `skills/objectstack-data/rules/validation.md` 的税号 hook
示例。
- 两分钟验证:`git diff origin/main -- skills/`,预期新示例声明 `refusals: {
ASSET_NOT_IN_STOCK: … status: 409 }` 并 `throw Object.assign(new Error(),
{ code: 'ASSET_NOT_IN_STOCK' })`,税号示例不再有 `throw new Error('Tax ID is
blocked')`。
- 需要你做的:受管面 Tier H(`skills/**`):请批准或合并。

## What changes

- **`skills/objectstack-data/references/data-hooks.md` § Declared
refusals** opens with the rule the card asks for: a hook that enforces a
business rule declares a `refusals` catalogue, one SCREAMING_SNAKE code
per rule, and its body throws the code. Without a catalogue, a throw is
answered `HOOK_ABORTED`, the platform's code, which suits a failure
nobody planned and not a rule the user can act on.
- The section's example (two single-object codes, `CREDIT_LIMIT` /
`ON_HOLD`, as an unchecked fragment) is replaced by the card's case as a
full `os:check` hook: `checkout_requires_stock`, a `beforeInsert` on
`asset_checkout` that reads the asset through `ctx.api` (`api.read`) and
throws `ASSET_NOT_IN_STOCK` (declared at 409) unless the asset's status
is `in_stock`. It fails closed: a checkout with no `asset_id` or an
unknown id is refused too (probed below); an asset the saver cannot read
finds nothing, so it is refused the same way (read, not probed).
- Which hook forms can declare `refusals` on `main` today: only a
sandboxed `js` `body`; a `handler` hook, an inline TS function included,
is refused (bullet replaces "Refused at save without a `js` body (e.g. a
bare `handler`)"). Nothing objectstack-ai#33214 would add is taught.
- What reaches the wire: the status's registered `code` (default 400),
with the hook's code as `declaredCode` (bullet replaces "the envelope
carries one as `declaredCode`").
- The Error Handling intro now says `onError` gives no code; Best
Practices' "give a thrown error a message the caller can act on" becomes
"refuse a business rule by a declared code", linking the section.
- **`skills/objectstack-data/rules/validation.md` § External / Custom
Validation → Lifecycle Hooks**, the hook rule that points to
`data-hooks.md`: the pointer sentence says the body "throws a declared
code" (linked to the section) instead of "throws on failure", and its
`os:check` tax-ID hook declares `refusals: { TAX_ID_BLOCKED: { message:
'This tax ID is blocked.' } }` and throws that code instead of `throw
new Error('Tax ID is blocked')`, which is exactly the `HOOK_ABORTED`
shape the card measured. This file was outside the order's expected
surface; the seat approved it in its thread before the edit (pointer
sentence plus the example's two lines).
- **`.changeset/33257-skills-hook-refuses-by-declared-code.md`**:
`'@objectstack/skills': patch`, carrying both declaration lines.

## Why

The card's measured build (gallery debut refresh 2026-11-14, card
`asset_lifecycle`, recorded build
`2026-11-14-scenario-asset_lifecycle.json`, cited and not re-run: a live
run needs the maintainer's word, per the order) enforced "only an
in-stock asset can be checked out" with a sandboxed hook that declared
no `refusals`; the probe write was refused `HOOK_ABORTED` (400), a
platform code. The skill taught the catalogue only as a mechanism, not
as the rule for business refusals, and `rules/validation.md` taught the
free-text throw outright.

Mechanism, read on `origin/main` `b5f2f516`:

- `packages/spec/src/data/hook.zod.ts`: `HookSchema.refusals` is a
record keyed by a SCREAMING_SNAKE code of `HookRefusalSchema`
(`message`: plain text, a `{{ }}` hole refused; `status`: 400 to 499,
absent means 400). `refuseUndeclaredLiteralRefusalCode` refuses
`refusals` on a hook whose `body.language` is not `js` (message from
`hookRefusalsWithoutSandboxedBody`,
`packages/spec/src/data/hook-refusal-codes.ts:201`), and refuses a
literally thrown code the catalogue does not declare.
- `packages/runtime/src/sandbox/hook-refusal-catalogue.ts`
`resolveHookRefusal`: a body throw carrying a declared code is answered
with the entry's message (translated through
`hooks.HOOK.refusals.CODE.message` in the caller's locale) as
`userMessage`, the entry's status (default `DEFAULT_HOOK_REFUSAL_STATUS`
400) and the code; an undeclared code, or none, becomes a sandbox fault
(500); host-relayed errors and crashes pass through.
- `packages/types/src/thrown-http-error.ts` `resolveThrownHttpError`: a
code outside the ADR-0112 ledger resolves the wire `code` from the
status (`standardErrorCodeForHttpStatus`: 400 `VALIDATION_ERROR`, 409
`RESOURCE_CONFLICT`) and keeps the thrown code as `declaredCode`. A
sandbox business throw with no code at a 4xx is answered
`UNDECLARED_HOOK_REFUSAL_CODE` = `HOOK_ABORTED` (ledger row in
`packages/spec/src/api/error-code-ledger.zod.ts`). So `HOOK_ABORTED`
does not come from `onError: 'abort'` as such: `onError: 'abort'` (the
default) only makes the throw abort the write; the code comes from the
throw carrying none.

## Acceptance notes

- Ask item 2 (an authoring rule or lint that a hook whose body refuses
on a business condition carries `refusals`) is not built here; the order
rules it a proposal in the report. Proposed there with the four-axis
reading.
- The ratchet row for `data-hooks.md` is left at 10011 with 2 tokens of
headroom and `validation.md` at 2761 with 1; no ceiling moved in either
direction (`scripts/` is outside this card's surface).
- Other teaching of the free-text throw in `skills/` was not swept
beyond the two files the card names; the order's serial constraints keep
`objectstack-data/SKILL.md` (PR objectstack-ai#33458), the data evals file (PR objectstack-ai#33394)
and `rules/security.md` (card objectstack-ai#33044) untouched.

## Verification

Head `47af59e9`, base `origin/main` `b5f2f516`.

<details><summary>Both new examples run in the real runtime (scratch
probe, not committed)</summary>

A throwaway vitest file in `packages/runtime/src/sandbox/`, on the
harness of `overlap-hook-template.integration.test.ts` (real `ObjectQL`,
SQLite driver, `QuickJSScriptRunner`, `bindHooksToEngine`, answers read
off `mapDataError`), each hook passed through `HookSchema.parse` first.
Run after building runtime's dependency closure under the verify lock
(VERDICT command-exit 0); then deleted (`git status` clean). Result:
Test Files 1 passed, Tests 3 passed, exit 0.

- `checkout_requires_stock`: an in-stock asset checks out; an
`in_repair` asset, a checkout with no `asset_id`, and an unknown id each
answer `409 {"error":"Only an in-stock asset can be checked
out.","code":"RESOURCE_CONFLICT","declaredCode":"ASSET_NOT_IN_STOCK","userMessage":"Only
an in-stock asset can be checked out."}`; one checkout row stored.
- `crm_tax_id_blocklist_check` (new shape): `400 {"error":"This tax ID
is
blocked.","code":"VALIDATION_ERROR","declaredCode":"TAX_ID_BLOCKED","userMessage":"This
tax ID is blocked."}`.
- The old tax shape (free text, no catalogue): `400 {"error":"Tax ID is
blocked","code":"HOOK_ABORTED"}`, the card's symptom.
- `HookSchema.safeParse` of a hook with `refusals` and a string
`handler`, and with an inline function `handler`: both `success: false`,
one issue at `refusals` ("`refusals` is answered only for a sandboxed
`body` (`language: 'js'`) ...").

</details>

<details><summary>Line and token budget (skills/**)</summary>

- `skills/objectstack-data/references/data-hooks.md`: 884 to 893 lines;
tokens 9962 to 10009 (ceiling 10011, headroom 2). Paid in the same file:
the protocol-17 history sentence under "An unevaluable condition ABORTS"
(its point is restated by the paragraph after it), that paragraph
shortened, and the old fragment example.
- `skills/objectstack-data/rules/validation.md`: 331 to 330 lines;
tokens 2754 to 2760 (ceiling 2761, headroom 1). Paid by deleting the
"Date range validation" line from Common Script Patterns, which restates
the `date_range` `cross_field` example in the same file.
- Whole package, all `skills/*/SKILL.md`: 4603 to 4603 lines (no
SKILL.md touched). Bundle total (whole shipped tree): 244659 to 244712
tokens.
- `node scripts/check-skills-token-ratchet.mjs`: exit 0. `node
scripts/pm/check-skill-line-ratchet.mjs`: exit 0 (neither file is on its
register). No ceiling raised.

</details>

<details><summary>Derived gates: 45 derived, 44 run green, 1 NOT
MEASURED</summary>

`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived 45 families for the three paths. All
run on head `47af59e9`, exit captured before any pipe, after building
`@objectstack/lint...`, `@objectstack/client-react...` and
`@objectstack/runtime^...` under the verify lock (VERDICT command-exit
0, 320s):

- 44 exit 0, among them `check-skills-token-ratchet` (scan and
`--self-test`), `check-adr-0087-registration`,
`check-changeset-no-major`, `check-empty-changeset`,
`check:doc-authoring`, `check:skill-links`,
`check:skill-identifier-liveness`, `check:skill-frame-sync`,
`check:corpus-claim-drift`, `check:nul-bytes`, `check:pm-skill-id-lint`,
`@objectstack/lint check:doc-formula-expressions`, `@objectstack/spec
check:skill-refs`, `check:dts-closure`, `check:lean-entry-closure`,
`check:sourcemap-no-sources-content`.
- NOT MEASURED, exit 3 PREREQUISITE NOT MET:
`check:dual-build-cjs-loads` (reads every package's dist; no package
source is touched, so no full build was paid locally; CI builds and runs
it).
- `--ran` reconciliation: "45 derived famil(ies) accounted for — 44 run,
1 NOT-MEASURED (1 DERIVED from a recorded exit 3)".
- Extra, not derived: `pnpm --filter @objectstack/spec
check:skill-examples` exit 0, "346 prose examples type-check across 3
surface(s)", which covers the new and the edited `os:check` blocks.
- CI families are read from this PR's check-runs, not re-run here.

</details>

<details><summary>Tier and governed readings</summary>

- `dispatch-gates --tier`: MANDATORY contract-review tier, both
`skills/**` paths under clause ① (the published catalog); no one-line
exit for this surface.
- `node scripts/pm/check-governed-merges.mjs --branch
claude/project-thread-g605co`: exit 3, GOVERNED, landing tier H (人合). 2
of 3 paths hit the register (`skills/**` x2); the changeset is not on
it. Size +47 / -29, under the 3000 threshold.

</details>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01FEkQ5njvc1ya6PypTHRBe5

## Round 1 (head `652a4a09`, after contract review 6885289276)

- **Delete guard (S1):** `data-hooks.md` Common Patterns "1. Preventing
Deletion (sandboxed `body`)" now declares `refusals` `STRATEGIC_ACCOUNT`
(400) and `OPEN_OPPORTUNITIES` (409) and throws each by code. The second
message drops the count, because a catalogue message takes no
parameters.
- **Wording (N1, N2):** "a `body`'s throw is answered `HOOK_ABORTED`";
`onError` "gives no code of the hook's own".
- **Paid in place:** the "Because the VM only holds a snapshot…"
paragraph (restated elsewhere in the file) and "(declared, never
produced)" in the `ctx.session` row.
- **Figures:** data-hooks.md 884 → 892 lines, 9962 → 10004 tokens
(ceiling 10011); validation.md 2760/2761, unchanged. No ceiling moved.
- **Verification on `652a4a09`:** 45 derived gates, 44 exit 0, 1 NOT
MEASURED (`check:dual-build-cjs-loads`). Scratch runtime probe, 4
passed: the guard answers 400 `VALIDATION_ERROR` with `declaredCode:
STRATEGIC_ACCOUNT`, then 409 `RESOURCE_CONFLICT` with `declaredCode:
OPEN_OPPORTUNITIES`, and deletes an account whose only opportunity is
closed.

<!-- signed: domain:skills#1 · os-project-manager ·
session_01FEkQ5pjSPT7ui2EUcunaVb -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

skills: the master_detail parent-currency path owes two follow-ups (ui dashboards aggregate rule, data eval case)

3 participants